package chan.project.smartlawdatamanage.consumer;

import chan.project.smartlawcommon.config.KafkaTopicConfig;
import chan.project.smartlawmodel.dto.instrument.InstrumentMessage;
import cn.hutool.json.JSONUtil;
import org.springframework.stereotype.Component;
import java.util.List;


import org.springframework.kafka.annotation.KafkaListener;

@Component
public class InstrumentMessageConsumer {

    @KafkaListener(topics = KafkaTopicConfig.INSTRUMENT_TOPIC, groupId = "instrument-group")
    public void consumeInstrumentMessage(String message) {
        try {
            List<InstrumentMessage> instrumentMessages = JSONUtil.toList(message, InstrumentMessage.class);

        } catch (Exception e) {

        }
    }
}